read command line input for agent image path name - #1678
Conversation
When the user provides an agent/clusterAgent image full path name use it in the GCP/GKE deployment. Signed-off-by: Alexandre Lavigne <alexandre.lavigne@datadoghq.com>
f52cc1e to
3082d7d
Compare
| if agentFullImagePath := env.AgentFullImagePath(); agentFullImagePath != "" { | ||
| k8sAgentOptions = append(k8sAgentOptions, kubernetesagentparams.WithAgentFullImagePath(agentFullImagePath)) | ||
| } | ||
|
|
||
| if clusterAgentFullImagePath := env.ClusterAgentFullImagePath(); clusterAgentFullImagePath != "" { | ||
| k8sAgentOptions = append(k8sAgentOptions, kubernetesagentparams.WithClusterAgentFullImagePath(clusterAgentFullImagePath)) | ||
| } | ||
|
|
There was a problem hiding this comment.
Have you experienced unexpected behavior before adding that?
Because what you just added is supposed to already be handled deeper in the function that install the agent on Kubernetes: https://github.com/DataDog/test-infra-definitions/blob/main/components/datadog/agent/kubernetes_helm.go#L140-L150
There was a problem hiding this comment.
I see yes it does what I was looking for, but cause it's not next to the other options. I did not see it.
I will close this PR then it's not necessary then.
| return components.NewComponent(&env, env.Namer.ResourceName("gke"), func(comp *kubeComp.Cluster) error { | ||
| cluster, kubeConfig, err := gke.NewCluster(env, "gke", params.autopilot) | ||
| return components.NewComponent(&env, env.Namer.ResourceName(env.Ctx().Stack()), func(comp *kubeComp.Cluster) error { | ||
| cluster, kubeConfig, err := gke.NewCluster(env, env.Namer.ResourceName(env.Ctx().Stack()), params.autopilot) |
There was a problem hiding this comment.
| cluster, kubeConfig, err := gke.NewCluster(env, env.Namer.ResourceName(env.Ctx().Stack()), params.autopilot) | |
| cluster, kubeConfig, err := gke.NewCluster(env, env.Namer.ResourceName("gke"), params.autopilot) |
The namer should already be responsible for adding a prefix derived from the stack name
|
duplicate use of option. the image nanme option is already used to build the right image name. |
What does this PR do?
When the user provides an agent/clusterAgent image full path name use it in the GCP/GKE deployment.
Which scenarios this will impact?
GCP + Azure
Motivation
Allows someone to deploy a cluster with a custom image.
Additional Notes